package com.vchello.bean.security;

import java.io.Serializable;
import java.util.Set;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

/**
 * 
 * @author power 角色
 */
@TableName("role")
public class Role extends Model<Role> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@TableField("id")
	private int id;

	@TableField("name")
	private String name;

	@TableField("user_id")
	private int userId;

	@TableField(exist = false)
	private Set<RoleSecurity> roleSecurityList;

	public Role(){}
	
	public Role(String name, int userId) {
		super();
		this.name = name;
		this.userId = userId;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getUserId() {
		return userId;
	}

	public void setUserId(int userId) {
		this.userId = userId;
	}

	public Set<RoleSecurity> getRoleSecurityList() {
		return roleSecurityList;
	}

	public void setRoleSecurityList(Set<RoleSecurity> roleSecurityList) {
		this.roleSecurityList = roleSecurityList;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}